|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrolesystem.roles.KnownEvent
public class KnownEvent
This class represents a known event, wich describes a kind of event expected for a role. A role includes several objects of this class, declared as "static final", one for each kind of expected event. Instances of this class are constant, once created they cannot be changed. A method is provided to check whether a RoleEvent and an instance of this class match.
| Constructor Summary | |
|---|---|
KnownEvent(java.lang.String name,
java.lang.String senderRole)
Constructs a known event with no informative content expected. |
|
KnownEvent(java.lang.String name,
java.lang.String senderRole,
java.lang.Class contentClass)
|
|
| Method Summary | |
|---|---|
java.lang.Class |
getContentClass()
Returns the class expected for the informative content of the event. |
java.lang.String |
getName()
Returns the expected for the event. |
java.lang.String |
getSenderRole()
Returns the role expected for the sender of the event. |
boolean |
match(RoleEvent event)
Check whether this KnownEvent and a specified RoleEvent match. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KnownEvent(java.lang.String name,
java.lang.String senderRole,
java.lang.Class contentClass)
name - Name expected for the event.senderRole - Role expected for the sender of the event.contentClass - Class expected for the informative content of
the event; if no informative content is expected for the event, it
must be null.
public KnownEvent(java.lang.String name,
java.lang.String senderRole)
name - Name expected for the event.senderRole - Role expected for the sender of the event.| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getSenderRole()
public java.lang.Class getContentClass()
public boolean match(RoleEvent event)
event - Instance of RoleEvent to check.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||